<template>
	<!-- 商品横向 -->
	<view class="goods-list">
		<view class="goods-item" v-for="(item,index) in list" :key="index" @click="$emit('click',item)">
			<image class="goods-item-image" :src="item.image" mode="widthFix"></image>
			<view>
				<view class="goods-item-title">{{item.goods_name}}</view>
				<view class="goods-item-bottom">
					<view class="goods-item-price">￥<text style="font-size: 18px;">{{item.goods_price}}</text></view>
					<view class="goods-item-btn">详情</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			list:Array
		},
		data(){
			return{
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	// 二手优品
	.goods-list{
		background-color: #ffffff;
		border-radius: 10rpx;
		width: 100%;
	}
	.goods-item{
		display: flex;
		align-items: center;
		background-color: #FFFFFF;
		padding: 10rpx;
		margin-bottom: 30rpx;
	}
	.goods-item-image{
		width: 140rpx;
		height: 140rpx;
		border-radius: 14rpx;
		flex-shrink: 0;
		margin-right: 20rpx;
		background-color: #C8443F;
	}
	.goods-item-title{
		font-weight: 400;
		font-size: 28rpx;
		color: #333333;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		width: 500rpx;
		margin-bottom: 20rpx;
	}
	.goods-item-bottom{
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.goods-item-price{
		font-weight: 400;
		font-size: 26rpx;
		color: #333333;
	}
	.goods-item-btn{
		width: 90rpx;
		height: 40rpx;
		border-radius: 10rpx;
		border: 1rpx solid #DBDBDB;
		font-weight: 400;
		font-size: 24rpx;
		color: #333333;
		line-height: 40rpx;
		text-align: center;
	}
</style>